﻿
// ReSharper disable CheckNamespace
namespace System.Web.UI
// ReSharper restore CheckNamespace
{
	/// <summary>
    ///  Extensions for HtmlTextWriter
    /// </summary>
	public static partial class HtmlWriterTextTagExtensions
	{
	    private static HtmlTextWriter PushTag(this HtmlTextWriter writer, string tagName, object atts = null)
	    {
            WritePreceeding(writer);
            tags.Push(new Tag(tagName, atts));
            return writer;
	    }

        #region html 5 tags

        /// <summary>
        ///  Article tag
        /// </summary>
        public static HtmlTextWriter Article(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("article", atts);
        }


        /// <summary>
        ///  Aside tag
        /// </summary>
        public static HtmlTextWriter Aside(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("aside", atts);
        }

        /// <summary>
        ///  Audio tag
        /// </summary>
        public static HtmlTextWriter Audio(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("audio", atts);
        }

        /// <summary>
        ///  Bdi tag
        /// </summary>
        public static HtmlTextWriter Bdi(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("bdi", atts);
        }

        /// <summary>
        ///  Canvas tag
        /// </summary>
        public static HtmlTextWriter Canvas(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("canvas", atts);
        }

        /// <summary>
        ///  Command tag
        /// </summary>
        public static HtmlTextWriter Command(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("command", atts);
        }

        /// <summary>
        ///  Datalist tag
        /// </summary>
        public static HtmlTextWriter Datalist(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("datalist", atts);
        }

        /// <summary>
        ///  Details tag
        /// </summary>
        public static HtmlTextWriter Details(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("details", atts);
        }

        /// <summary>
        ///  FigCaption tag
        /// </summary>
        public static HtmlTextWriter FigCaption(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("figcaption", atts);
        }

        /// <summary>
        ///  Figure tag
        /// </summary>
        public static HtmlTextWriter Figure(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("figure", atts);
        }

        /// <summary>
        ///  Footer tag
        /// </summary>
        public static HtmlTextWriter Footer(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("footer", atts);
        }

        /// <summary>
        ///  Header tag
        /// </summary>
        public static HtmlTextWriter Header(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("header", atts);
        }

        /// <summary>
        ///  hGroup tag
        /// </summary>
        public static HtmlTextWriter HGroup(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("hgroup", atts);
        }

        /// <summary>
        ///  Nav tag
        /// </summary>
        public static HtmlTextWriter Nav(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("nav", atts);
        }

        /// <summary>
        ///  Section tag
        /// </summary>
        public static HtmlTextWriter Section(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("section", atts);
        }

        /// <summary>
        /// Source tag
        /// </summary>
        public static HtmlTextWriter Source(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("source", atts);
        }

        /// <summary>
        /// Video tag
        /// </summary>
        public static HtmlTextWriter Video(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("video", atts);
        }

        /// <summary>
        /// KeyGen tag
        /// </summary>
        public static HtmlTextWriter KeyGen(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("keygen", atts);
        }
        
        /// <summary>
        /// Mark tag
        /// </summary>
        public static HtmlTextWriter Mark(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("mark", atts);
        }

        /// <summary>
        /// Meter tag
        /// </summary>
        public static HtmlTextWriter Meter(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("meter", atts);
        }

        /// <summary>
        /// Output tag
        /// </summary>
        public static HtmlTextWriter Output(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("output", atts);
        }

        /// <summary>
        /// Progress tag
        /// </summary>
        public static HtmlTextWriter Progress(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("progress", atts);
        }


        /// <summary>
        /// Summary tag
        /// </summary>
        public static HtmlTextWriter Summary(this HtmlTextWriter writer, object atts = null)
        {
            return writer.PushTag("summary", atts);
        }

        #endregion
    }
}